     These files contain code to calculate residuals from an 8-quarter-ahead forecast as recommended in James D. Hamilton, "Why You Should Never Use the Hodrick-Prescott Filter", Review of Economics and Statistics, forthcoming, in either RATS or Matlab programming language, along with data to replicate the analysis of nonfarm payroll employment.
     In the Matlab directory, regcyc.m is a function that returns the cyclical component as calculated from a linear regression, while rwcyc.m returns the cyclical component for the special case of a random walk.  Sample code calling these is provided in main_control.m.
     In the RATS directory, regfilt.src is a procedure that returns the cyclical component as calculated from a linear regression, while hdif.src returns the cyclical component for the special case of a random walk.  Sample code calling these (which was used to generate the graphs in the paper) is provided in employment_graph.prg.  Output from running that code is in employment_graph.out.
     All files are simple ASCII files that can be viewed using any text editor.